<?php
/**
 * americannewupdatecontroller.php
 * Create on 2016-03-30 10:35:32
 * Create by yuebin
 */
namespace haibao\cms\business\control\pc\channel\american;

use \haibao\cms\business\control\ArticleController as ArticleController;

class AmericanNewUpdateController extends \haibao\cms\business\control\AmericanController{
	
	public function __construct($updateTime = null,$controlId,$isPublish){
		parent::__construct($updateTime,$controlId,$isPublish);
	}
	
	/**
	 * 显示模版内容（模版动态数据的绑定和模版输出）
	 * @param : String $content
	 * @param : Array $controlData;
	 */
	public function displayTemplateHtml(){
		$controlData = $this->getParameter(self::$CONTROL_DATA);
		$content = $this->getParameter(self::$CONTROL_CONTENT);
		$path = $this->generateHtmlPath(__CLASS__);
		//最新文章
		$updateNew = array();
		$updateNew = $this->getArticleInfo(1);
        $this->assign('icon', self::$videoArticleTag);
		$this->assign('updateNew', $updateNew);
		$this->assign('moreUrl', \haibao\classlibrary\cms\Config::getConfig(\haibao\classlibrary\cms\Config::CLASSLIBRARY_CONFIG_TV_HOST).'tv/'.$this->conditionTagId.'/');
		$parameters = $this->getControlParameters($controlData);
		$this->assign('parameters', $parameters);
		$this->assign('userHostColler', \haibao\classlibrary\cms\Config::getConfig(\haibao\classlibrary\cms\Config::CLASSLIBRARY_CONFIG_HOST_USER));
		$this->generateHtml($path, $content);
		$content = $this->getHtml($path);
		$content = $this->replaceCDNLink($content);
		return $content;
	}
	
}